﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.ServiceModel.Configuration;
using System.ServiceModel.Channels;
using System.ServiceModel.Web; 
using System.Text;
using GmaWebService;
using GmaWebService.Code;

namespace GmaWebService.ConsoleHost
{
    class Program
    {
        
        static void Main(string[] args)
        {
            Log.Debug("GmaWebService ConsoleHost starting....");

            ServiceHost host = new ServiceHost(typeof(MediaAccessService));
            Log.Debug("Opening ServiceHost...");
            host.Open();
            Log.Debug("Host opened");

            Log.Info("GmaWebService ConsoleHost started....");
            NLog.LogManager.Flush();

            Console.WriteLine("Press ENTER to close");
            Console.ReadLine();
            host.Close();

            Log.Debug("GmaWebService ConsoleHost closed...");
        }
    }
}
